<html>
<head>
<link href = "../css/border_style_rounded.css" type = "text/css" rel = "stylesheet" />

</head>

<?
	session_start();

	if(isset($_SESSION['username']))
	{
		if(isset($_SESSION['category']))
		{
			$cat = $_SESSION['category'];
			header("location:../$cat/profile.php?username=".$_SESSION['username']);
		}		
	}

?>


<body>
		<form action='login_handler.php' method = 'post'>
		<div class="divTable">
		        <div class="headRow">
        		        <div class="divCell_info">Username/Email : </div>
        		        <div class="divCell_input"><input class = 'rounded' type = 'text' name = 'txt_username_email' id = 'username_email' onblur = 'return valid(this.id)' /></div>
        		        <div class="divCell_error"><label id = 'lbl_username_email'></label></div>
        		</div>
            		<div class="divRow">
        		        <div class="divCell_info">Password : </div>
        		        <div class="divCell_input"><input class = 'rounded' type = 'password' name = 'txt_password' id = 'password' onblur ='return valid(this.id)' onkeyup = 'return mail()' /></div>
        		        <div class="divCell_error"><label id = 'lbl_password'></label></div>
        		</div>
            		<div class="divRow">
        		        <div class="divCell_info"> </div>
        		        <div class="divCell_input"><input class = 'rounded' type = 'submit' name = 'btn_submit' id = 'submit' value = "Login" onblur = 'return valid(this.id)' onkeyup = 'return pwd()' /></div>
        		        <div class="divCell_error"><label id = 'lbl_submit'></label></div>
        		</div>
</div>
<?
	if(isset($_GET['msg']))
	{
		$msg = $_GET['msg'];
	}
	else
	{
		$msg = "";
	}
	echo $msg;
?>
</body>
</html>
